/**
 * 
 */
package co.gov.medellin.sdep.sisdep.common;

import java.io.Serializable;

import co.gov.medellin.sdep.sisdep.common.exception.RootException;
import co.gov.medellin.sdep.sisdep.common.message.RootMessageDescriptor;

/**
 * @author Usuario
 *
 */
public abstract class BaseException extends RootException implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public BaseException() {
		super();
	}

	/**
	 * @param message
	 */
	public BaseException(String message) {
		super(message);
	}

	/**
	 * @param cause
	 */
	public BaseException(Throwable cause) {
		super(cause);
	}

	/**
	 * @param message
	 * @param cause
	 */
	public BaseException(String message, Throwable cause) {
		super(message, cause);
	}

	/**
	 * 
	 * @param descriptor
	 * @param infoError
	 * @param causa
	 */
	public BaseException(RootMessageDescriptor descriptor, Object [] infoError, Throwable causa) {
		super(descriptor.getTechnicalMessage(infoError), causa);
		setEndUserMessage(descriptor.getEndUserMessage(infoError));
	}

	/**
	 * 
	 * @param descriptor
	 * @param infoError
	 */
	public BaseException(RootMessageDescriptor descriptor, Object [] infoError) {
		super(descriptor.getTechnicalMessage(infoError));
		setEndUserMessage(descriptor.getEndUserMessage(infoError));
	}

}
